//
//  main.swift
//  Swift01
//
//  Created by 支婷婷 on 2017/9/11.
//  Copyright © 2017年 支婷婷. All rights reserved.
//

import Foundation

func getname() -> String
{
    let cha = ["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"]
    var result:String = ""
    for i in 0...5{
        let index:Int = Int(arc4random()) % 25 + 1
        result.append(cha[index])
    }
    return result
}

func getage()->Int
{
    return Int(arc4random()) % 10 + 18
}




public class girl
{
    private var Name:String
    private var Age:Int
    
    init(Name:String,Age:Int)
    {
        self.Name = Name
        self.Age = Age
    }
    
    public func date()
    {
        print("约会 ： name是：\(self.Name)           age是：\(self.Age)")
    }
}


for i in 0...999
{
    let girlfriend  =  girl(Name:getname(),Age:getage())
    girlfriend.date()
}
